<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>在线投稿----福州大学机械工程及机械化学院</title>
        <link rel="stylesheet" type="text/css" href="__TMPL__../Admin/p/base.css"/>
        <style type="text/css">
            #attPli li{float:left;margin-right:20px;}
            #attPli label{padding-left:6px;font-size:14px;}
        </style>
        <script type="text/javascript" src="__TMPL__../Admin/ui/jquery/jquery-1.3.js"></script>
        <script type="text/javascript" src="__TMPL__../Admin/ui/jquery/jquery.autoComplete.js"></script>
        <script type="text/javascript" src="__TMPL__../Admin/p/base.js"></script>
        <script type="text/javascript" src="__TMPL__../Admin/ui/my97/WdatePicker.js"></script>
    </head>
    <body>
        <div id="container" class="clearfix">
            <div id="menu">
                <p style="font-size:24px;font-weight:bold;padding:4px 0;padding-left:50px;color:#6E3441">在线投稿-----<a>福州大学机械工程与自动化学院</a></p>
            </div>
            <ol id="main">
                <li class="operate" >
                    <ul class="fnc">
                        <li><a href="#nogo" class="button" onclick="doAction('save')"><span>保存</span></a></li>
                    </ul>
                </li>
                <li class="view">
                    <form method="post">
                        <table class="ips">
                            <tbody>
                                <tr>
                                    <th class="essential"><label for="pk1">所属栏目：</label></th>
                                    <td>
                                        <select name="category">
                                            <option value="0">请选择...</option>
                                            <iterate name="category" id="vo">
                                                <if condition="$vo['typeformat'] eq 'L'">
                                                    <option value="{$vo['id']}">{$vo['fullname']}</option>
                                                </if>
                                            </iterate>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <th class="essential"><label for="pk2">标题：</label></th>
                                    <td>
                                        <input id="pk2" type="text" name="title" maxlength="250" size="75" autocomplete="off" style="font-weight:bold">
                                        <p class="hint">长度不能超过250个字符线</p>
                                    </td>
                                </tr>
                                <tr>
                                    <th class="essential"><label for="pk3">添加时间：</label></th>
                                    <td>
                                        <input id="pk3" type="text" name="pubdate" maxlength="250" size="25" value="{:now()}" onfocus="this.blur()"/>
                                        <img onclick="WdatePicker({el:$dp.$('pk3'),dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'%y-%M-%d'})" src="__TMPL__ui/my97/skin/datePicker.gif" width="16" height="22" align="absmiddle"/>
                                        <p class="hint">请通过右侧的日期选择器选取时间</p>
                                    </td>
                                </tr>
                                <tr>
                                    <th><label for="pk4">文档属性：</label></th>
                                    <td>
                                        <ul id="attPli">
                                            <li><input id="attT" type="checkbox" name="att[]" value="T"/><label for="attT">置顶</label></li>
                                            <li><input id="attB" type="checkbox" name="att[]" value="B"/><label for="attB">加粗</label></li>
                                            <li><input id="attC" type="checkbox" name="att[]" value="C"/><label for="attC">推荐</label></li>
                                            <li><input id="attS" type="checkbox" name="att[]" value="S"/><label for="attS">幻灯</label></li>
                                            <li><input id="attP" type="checkbox" name="att[]" value="P"/><label for="attP">滚动</label></li>
                                            <li><input id="attJ" type="checkbox" name="att[]" value="J" onclick="jumpUrlSupport(this)" /><label for="attJ">跳转</label></li>
                                        </ul>
                                    </td>
                                </tr>
                            </tbody>
                            <tbody id="jumpUrlBody" style="display:none">
                                <tr>
                                    <th class="essential"><label for="pk01">跳转地址：</label></th>
                                    <td>
                                        <input id="pk01" type="text" name="jumpurl" maxlength="250" size="75" />
                                        <p class="hint">长度不能超过250个字符</p>
                                    </td>
                                </tr>
                            </tbody>
                            <tbody>
                                <tr>
                                    <th><label>内容：</label></th>
                                    <td>
                                        <input type="hidden" id="archivecontent" name="content" style="display:none" />
                                        <input type="hidden" id="FCK_archiveAdd___Config" value="" style="display:none" />
                                        <iframe id="FCK_archiveAdd___Frame" src="__TMPL__../Admin/ui/fckeditor/editor/fckeditor.html?InstanceName=archivecontent&Toolbar=PEArchive" width="600" height="450" frameborder="0" scrolling="no"></iframe>
                                    </td>
                                </tr>
                                <tr>
                                    <th><label for="pk51">缩略图设置：</label></th>
                                    <td>
                                        <p><input id="hideN" type="radio" name="thumgsetting" value="auto" checked onclick="enableThumburl(this)"/><label for="hideN" class="item">自动提取</label></p>
                                        <p><input id="hideY" type="radio" name="thumgsetting" value="set" onclick="enableThumburl(this)"/><label for="hideY" class="item">自定义</label>
                                        <p id="thumbp" style="display:none">
                                            <label for="pk78">缩略图地址:</label><input id="pk78" type="text" name="thumb" maxlength="250" size="50" autocomplete="off" />
                                        </p>
                                    </td>
                                </tr>
                                <tr>
                                    <th><label for="pk11">作者：</label></th>
                                    <td>
                                        <input id="pk11" type="text" name="author" maxlength="32" size="40" autocomplete="off"/>
                                        <p class="hint">长度不能超过32个字符</p>
                                    </td>
                                </tr>
                                <tr>
                                    <th><label for="pk12">来源：</label></th>
                                    <td>
                                        <input id="pk12" type="text" name="source" maxlength="32" size="40" autocomplete="off"/>
                                        <p class="hint">长度不能超过32个字符</p>
                                    </td>
                                </tr>
                                <tr>
                                    <th><label for="pk13">关键字：</label></th>
                                    <td>
                                        <textarea id="pk13" rows="2" cols="50" name="keywords"></textarea>
                                        <p class="hint"><a href="javascript:insertComma()">每个关键字之间以","分隔，您可以点击这里插入此字符</a></p>
                                    </td>
                                </tr>
                                <tr>
                                    <th><label for="pk14">摘要：</label></th>
                                    <td>
                                        <textarea rows="2" cols="50" id="pk14" name="summary"></textarea>
                                        <p class="hint">长度不能超过250个字符。如果不填写此项，系统将自动生成摘要</p>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </form>
                </li>
                <li class="operate">
                    <ul class="fnc">
                        <li><a href="#nogo" class="button" onclick="doAction('save')"><span>保存</span></a></li>
                    </ul>
                </li>
            </ol>
        </div>
    </body>
    <script type="text/javascript">
        function doAction(action){
            if(!validate([
                {name:'category',point:[{type:'id',msg:'请选择所属栏目'}],trim:false},
                {name:'title',point:[{type:'require',msg:'标题填写不正确'}],trim:true}
            ])) return;
            lock(true);
        //    $("form").attr("action", "__URL__/"+action).submit();
        }
        function jumpUrlSupport(obj){
            if($(obj).attr("checked")) $("#jumpUrlBody").fadeIn();
            else  $("#jumpUrlBody").fadeOut();
        }
        function insertComma(){
            var $area=$("textarea[name='keywords']");
            $area.val($area.val()+",").focus();
        }

        var authorCache=null;
        var sourceCache=null;
        $(function(){
            //作者的下拉列表
            if(authorCache){
                var author=new Array();
                for (i = 0,max=authorCache.length; i < max; i++) {
                    author.push({html:authorCache[i].author});
                }
                $("input[name='author']").autoComplete(author,function(){
                    $("input[name='author']").val($(this).text());
                });
            }
            //来源的下拉列表
            if(sourceCache){
                var source=new Array();
                for (i = 0,max=sourceCache.length; i < max; i++) {
                    source.push({html:sourceCache[i].source});
                }
                $("input[name='source']").autoComplete(source,function(){
                    $("input[name='source']").val($(this).text());
                });
            }
        });
        function enableThumburl(obj){
            if($(obj).val()=="set"){
                $("#thumbp").show();
                $(":input[name='thumburl']").focus();
            }else{ $("#thumbp").hide();}
        }
    </script>
</html>